<?php
class EventsType extends AppModel {
	var $name='cateventstype';
	//var $scaffold;
	public $hasMany = array(
		'EventsTypeFields' => array(
		    'className' => 'EventsTypeFields'
		)/*,
		'EventsCategories' => array(
		    'className' => 'EventsCategories'
		)*/
	    );
	
	public $validate = array(
		'name'=>array(
			'rule_1'=>array(
											'rule'=>'notEmpty',
											'require'=>true,
											'message'=>'El campo Nombre es obligatorio'),
			'rule_2'=>array(
											'rule'    => 'isUnique',
											'message' => 'Este nombre ya existe.'),
			
			),
		'status'=>array(
			'rule_1'=>array(
											'rule'=>'notEmpty',
											'require'=>true,
											'message'=>'El campo Estado es obligatorio'),			
			), 
		);
}